package yyee.llee.mmee.net.api

import com.jhweather.net.response.BaseResponse
import yyee.llee.mmee.base_api_net.base_api_bean.WeatherHour
import yyee.llee.mmee.base_api_net.base_api_bean.bean.AirCityInfoBean
import yyee.llee.mmee.base_api_net.base_api_bean.bean.AirCityQuality
import yyee.llee.mmee.base_api_net.base_api_bean.bean.CalendarBean
import yyee.llee.mmee.base_api_net.base_api_bean.bean.GuideToLifeBean
import yyee.llee.mmee.base_api_net.base_api_bean.bean.ResAlarmBean
import yyee.llee.mmee.base_api_net.base_api_bean.bean.ToadyWeatherBean
import yyee.llee.mmee.net.response.BaseResponseForJH
import yyee.llee.mmee.base_api_net.base_api_bean.bean.*
import com.ultra.kingclean.cleanmore.bean.ReqWarningBean
import com.ultra.kingclean.cleanmore.bean.ReqWeatherBean
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

/**
 *
 * api接口
 *
 */
interface IServiceApi {

    /**
     * 实时天气
     */
    @GET("/simpleWeather/query?key=3ecbb3b24633189636d525ff67520c03")
    suspend fun getWeatherNow(@Query("city") city: String): BaseResponseForJH<ToadyWeatherBean>

    /**
     * 生活建议
     */
    @POST("/simpleWeather/life?key=3ecbb3b24633189636d525ff67520c03")
    suspend fun getSuggestion(@Query("city") city: String): BaseResponseForJH<GuideToLifeBean>


    /**
     * 万年历
     */
    @POST("/calendar/day?key=")
    suspend fun requestCalendar(@Query("date") date: String): BaseResponse<CalendarBean>

    /**
     * 24小时预报
     */
    @POST("/v1/weather/hour")
    suspend fun requestWeatherHour(@Body reqWeatherBean: ReqWeatherBean): BaseResponse<WeatherHour>

    /**
     * 当前空气质量
     */
    @GET("/environment/air/cityair?key=aa2cd700245db49d86662bc19fd96d61")
    suspend fun getAirNow(@Query("city") city: String): BaseResponseForJH<ArrayList<AirCityInfoBean>>

    /**
     * 空气质量详情
     */
    @POST("/environment/air/pm?key=aa2cd700245db49d86662bc19fd96d61")
    suspend fun getAirDay(@Query("city") city: String): BaseResponseForJH<ArrayList<AirCityQuality>>

    /**
     * 天气预警
     */
    @POST("/v1/weather/alarm")
    suspend fun getAlarm(@Body reqWarningBean: ReqWarningBean): BaseResponse<ResAlarmBean>

}
